package com.anycl.customer.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

import java.sql.Timestamp;

/**
 * 客户
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Customer {
    private Long id;
    private String name;
    private String address;
    private String telephone;
    private String email;
    private Integer status;
    private String remark;
    private Timestamp createTime;
    private Timestamp updateTime;

    public Customer(String name, String address, String telephone, String email, String remark) {
        this.name = name;
        this.address = address;
        this.telephone = telephone;
        this.email = email;
        this.remark = remark;
    }
    public boolean createValidate() {
        return !StringUtils.isEmpty(name) &&
                !StringUtils.isEmpty(address) &&
                !StringUtils.isEmpty(telephone) &&
                !StringUtils.isEmpty(email);
    }
}
